package bojin.studio.cpbl;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class cpbl extends Activity {
    /** Called when the activity is first created. */	
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.cpbl);
       Button b1=(Button)findViewById(R.id.button1);
       Button b2=(Button)findViewById(R.id.button2);
       Button b3=(Button)findViewById(R.id.button3);
       Button b4=(Button)findViewById(R.id.button4);
       Button b5=(Button)findViewById(R.id.button5);
       Button b6=(Button)findViewById(R.id.button6);
       Button b7=(Button)findViewById(R.id.button7);
       b1.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{   
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/news/Allnews.asp");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       		
       	}
       });
       b2.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{    
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/standings/Allscoreqry.aspx");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       	}
       });
       b3.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{    
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/Score/FightScore.aspx");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       	}
       });
       b4.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{    
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/Personal_Rec/RecList.aspx?CID=CPBL");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       	}
       });
       b5.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{    
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/GResult/Result.aspx?Gameno=01&pbyear=2011&game=61");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       	}
       });
       b6.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{    
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/personal_Rec/PlayerChg.aspx");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       	}
       });
       b7.setOnClickListener(new OnClickListener() 
       {
       	public void onClick(View v)
       	{    
       		Uri uri=Uri.parse("http://www.cpbl.com.tw/fans/discusMain.aspx");
       		Intent intent=new Intent(Intent.ACTION_VIEW,uri);
       		startActivity(intent);
       	}
       });
       
      
   }

}
